#include "MotionSensor.h"

MotionSensor::MotionSensor(uint8_t pin) : _pin(pin) {}

void MotionSensor::begin() {
    pinMode(_pin, INPUT);
    Serial.printf("[Motion] 初始化完成 | 引脚:%d\n", _pin);
}

bool MotionSensor::isHumanDetected() {
    _lastState = digitalRead(_pin);
    return _lastState;
}
